<h3>Information Brochures</h3>
<ul>
<?php // List All Product Brochures

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'General Document'
		);
   $infobrochures = new WP_Query($args);

   if($infobrochures->have_posts()) : 
      while($infobrochures->have_posts()) : 
         $infobrochures->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Case Studies</h3>
<ul>
<?php // List All Case Studies

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Case Study'
		);
   $casestudies = new WP_Query($args);

   if($casestudies->have_posts()) : 
      while($casestudies->have_posts()) : 
         $casestudies->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product Brochures</h3>
<ul>
<?php // List All Case Studies

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Brochure'
		);
   $productbrochures = new WP_Query($args);

   if($productbrochures->have_posts()) : 
      while($productbrochures->have_posts()) : 
         $productbrochures->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product Data Sheets</h3>
<ul>
<?php // List All Data Sheets

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Data Sheet'
		);
   $productdatasheets = new WP_Query($args);

   if($productdatasheets->have_posts()) : 
      while($productdatasheets->have_posts()) : 
         $productdatasheets->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product Installation Manuals</h3>
<ul>
<?php // List All Installation Manuals

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Installation Manual'
		);
   $productinstalls = new WP_Query($args);

   if($productinstalls->have_posts()) : 
      while($productinstalls->have_posts()) : 
         $productinstalls->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product Warranties</h3>
<ul>
<?php // List All Warranties

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Warranty'
		);
   $productwarranties = new WP_Query($args);

   if($productwarranties->have_posts()) : 
      while($productwarranties->have_posts()) : 
         $productwarranties->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product SRCC OG-100 Certifications</h3>
<ul>
<?php // List All SRCC OG-100 CERTFICATIONS

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'SRCC OG-100 Certification'
		);
   $productsrccog100 = new WP_Query($args);

   if($productsrccog100->have_posts()) : 
      while($productsrccog100->have_posts()) : 
         $productsrccog100->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product SRCC OG-300 Certifications</h3>
<ul>
<?php // List All SRCC OG-300 CERTFICATIONS

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'SRCC OG-300 Certification'
		);
   $productsrccog300 = new WP_Query($args);

   if($productsrccog300->have_posts()) : 
      while($productsrccog300->have_posts()) : 
         $productsrccog300->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product CAD Drawings</h3>
<ul>
<?php // List All CAD DRAWINGS

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'CAD Drawing'
		);
   $productcad = new WP_Query($args);

   if($productcad->have_posts()) : 
      while($productcad->have_posts()) : 
         $productcad->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>

<h3>Product Piping Diagram</h3>
<ul>
<?php // List All PIPING DIAGRAM

   $args = array(
		'post_type' => 'document',
		'meta_key' => 'documenttype',
		'meta_value' => 'Piping Diagram'
		);
   $productpiping = new WP_Query($args);

   if($productpiping->have_posts()) : 
      while($productpiping->have_posts()) : 
         $productpiping->the_post();
?>

	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>      
      
<?php
      endwhile;
   else: 
?>

      <li>There are currently no documents for download.</li>

<?php
   endif;
   wp_reset_query();
?>
</ul>